package com.jpx.jxcupms.service.impl;

import com.jpx.jxcupms.entity.TMenu;
import com.jpx.jxcupms.mapper.TMenuMapper;
import com.jpx.jxcupms.service.ITMenuService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mht
 * @since 2020-02-22
 */
@Service
public class TMenuServiceImpl extends ServiceImpl<TMenuMapper, TMenu> implements ITMenuService {

    @Cacheable(value = "getMenuByUserName")
    @Override
    public List<TMenu> getMenuByUserName(String name) {
        return this.baseMapper.getMenuByUserName(name);
    }

    @Override
    public List<TMenu> getMenu() {
        return this.baseMapper.getMenu();
    }
}
